package com.heiketu.service.impl;

import com.heiketu.mapper.TUserMapper;
import com.heiketu.objs.User;
import com.heiketu.service.TUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.StringUtils;

import javax.annotation.Resource;
import java.util.Objects;

@Service
public class TUserServiceImpl implements TUserService {

    @Resource
    private TUserMapper tUserMapper;

    @Override
    public User findUserByUserName(String username) {
        if(StringUtils.isEmpty(username)){
            throw new RuntimeException("登录名为空");
        }
        User user = tUserMapper.findUserByUsername(username);
        System.out.println(user);
        return user;
    }
}
